<template>
  <div id="Header">
			<div class="header-left">
              <div class="info_center">{{noticname}}</div>
      </div>
			<div class="header-right">
				<div class="right-content">
					<img style="width:20px;height:20px" src="../assets/user-image/header.png" />
                    <span class="provice">{{session.user.province}}</span>
                    <span style="color:#CFD6E6">{{session.user.name}}</span>
                   
				</div>
				
			</div>
      <div class="back">
         <a href="../mokuai/index.php#s">
            <p></p>
            <span>返回</span>
         </a>
      </div>
		</div>
</template>

<script>
export default {
  name:"Header",

  components:{},
  props:{},
  data(){
    return {
      session:{},
      noticname:"",
    }
  },
  watch:{
    '$route'(){
        this.noticname=this.$route.name=='User'?'用户管理':this.$route.name=='Notic'?"通知公告管理":"技术支持管理"
    }
  },
  computed:{},
  methods:{},
  created(){
  /*if(JSON.parse(sessionStorage.getItem('session'))){
     this.session = JSON.parse(sessionStorage.getItem('session'))
   }else{
     this.$confirm(`登录失效，请重新登录`, '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(()=>{
           window.location.href='../Dynamic_work.php'
        }).catch(()=>{
           window.location.href='../Dynamic_work.php'
          return false
        })
       sessionStorage.clear()
   
   }*/
    this.noticname=this.$route.name=='User'?'用户管理':this.$route.name=='Notic'?"通知公告管理":this.$route.name=='Technology'?"技术支持管理":"短信服务管理"
    this.session = {user:{name:"张山",province:"湖南省"}}
  },
  mounted(){
    let a = document.getElementsByTagName('a')
    /*console.log(a)
    console.log(a[0].style.marginLeft="15%")*/
  }
}
</script>
<style lang="stylus" scoped  >
#Header 
 display grid
 grid-template-columns: 70% 16% 13%
 background rgb(3,29,51)
 grid-template-rows: 60px;
 font-size 14px
 .header-left
   padding 1% 0 0 5% 
 .header-right
   display  flex
   justify-content flex-end
   align-items center
  .right-content
    color white
   img 
    vertical-align bottom
   span
     padding 0 10px
     text-align center    
   .provice
     border-right: 1px solid;
     color #CFD6E6
   a 
    color #CFD6E6
    p
     background-image url('../assets/user-image/return .png')
     height 20px
     width 25px
     margin 0px
     display inline-block
     vertical-align bottom
   a:hover
    color #f9bf3b !important;
    p
     background-image url('../assets/returns.png')
  .back
   display flex
   justify-content flex-end
   align-items center
   
  .info_center
   color #cfd6e6
   font-size 22px
   -webkit-box-reflect: below 0 -webkit-linear-gradient(transparent,transparent 20%,rgba(255,255,255,.5))
   line-height 1
   
 </style>